package com.allwayz.service.impl;

import com.allwayz.dao.PaymentDao;
import com.allwayz.entity.Payment;
import com.allwayz.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author allwayz
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    /**
     * 除了Autowired,Resource也可以进行资源注入
     */
    @Resource
    private PaymentDao paymentDao;


    @Override
    public int create(Payment payment){
        return paymentDao.create(payment);
    }
    @Override
    public Payment getPaymentById(Long id){
        return paymentDao.getPaymentById(id);
    }

    @Override
    public List<Payment> getPaymentList(){
        return paymentDao.getPaymentList();
    }
}
